package com.zd.kids.ui.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zd.kids.R;

import java.util.List;

import androidx.annotation.Nullable;

/**
 * @ClassName: com.zd.kids.ui.adapter
 * @Description:
 * @Author: hyy
 * @Date: 2020/7/20
 * @Time: 1:42 PM
 */
public class WordTitleAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public WordTitleAdapter(@Nullable List<String> data) {
        super(R.layout.layout_word_title_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {

        String[] titls = item.split(",");

        TextView tv_words = helper.getView(R.id.tv_words);
        tv_words.setText(titls[0]);

        TextView tv_py = helper.getView(R.id.tv_py);
        tv_py.setText(titls[1]);
    }
}
